package top.wintp.offlinedataanalysis.anlyser.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * stats_event
 * @author 
 */
public class StatsEvent extends StatsEventKey implements Serializable {
    /**
     * 触发次数
     */
    private Integer times;

    private Date created;

    private static final long serialVersionUID = 1L;

    public Integer getTimes() {
        return times;
    }

    public void setTimes(Integer times) {
        this.times = times;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        StatsEvent other = (StatsEvent) that;
        return (this.getPlatformDimensionId() == null ? other.getPlatformDimensionId() == null : this.getPlatformDimensionId().equals(other.getPlatformDimensionId()))
            && (this.getDateDimensionId() == null ? other.getDateDimensionId() == null : this.getDateDimensionId().equals(other.getDateDimensionId()))
            && (this.getEventDimensionId() == null ? other.getEventDimensionId() == null : this.getEventDimensionId().equals(other.getEventDimensionId()))
            && (this.getTimes() == null ? other.getTimes() == null : this.getTimes().equals(other.getTimes()))
            && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPlatformDimensionId() == null) ? 0 : getPlatformDimensionId().hashCode());
        result = prime * result + ((getDateDimensionId() == null) ? 0 : getDateDimensionId().hashCode());
        result = prime * result + ((getEventDimensionId() == null) ? 0 : getEventDimensionId().hashCode());
        result = prime * result + ((getTimes() == null) ? 0 : getTimes().hashCode());
        result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", times=").append(times);
        sb.append(", created=").append(created);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}